package com.itcast.plane.modoule.admin.controller;

import com.itcast.plane.modoule.admin.dto.AdminLogDTO;
import com.itcast.plane.modoule.admin.service.AdminService;
import com.itcast.plane.util.JsonResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/admin")
public class AdminController {

    @Resource
    private AdminService adminService;

    @PostMapping("/login")
    public JsonResult login(@RequestBody AdminLogDTO logDTO) {
        return adminService.login(logDTO);
    }
}
